package com.tidc.seaserverservice.service;

import com.tidc.seaservermodel.entity.Fres;
import com.tidc.seaservermodel.entity.Task;
import com.tidc.seaservermodel.entity.UserTask;
import com.tidc.seaservermodel.exception.TidcAuthorityException;
import com.tidc.seaservermodel.exception.TidcBadParent;
import com.tidc.seaservermodel.exception.TidcQuartzException;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * @author ：冯涛滔
 * @date ：Created in 2020/9/14 16:25
 * @description：
 * @modified By：
 * @version:
 */
public interface SecondaryTaskService {
    Fres<Map<Object, Object>> getTaskAll(String query,int pageSize, int pageNum, Authentication authentication) throws TidcBadParent, ParseException;
    Fres<String> receiveTask(Task task, Authentication authentication) throws TidcBadParent, ParseException, SQLException, TidcAuthorityException, TidcQuartzException;
    Fres<Map<Object, Object>> getIReceiveTask(int pageSize, int pageNum, Authentication authentication) throws TidcBadParent;
    Fres<Map<Object, Object>> getOngoingTask(int pageSize, int pageNum, Authentication authentication) throws TidcBadParent;
    Fres<String> finishTask(Authentication authentication, UserTask userTask) throws Exception;
    Fres<Map<Object, Object>> completedTask(int pageSize, int pageNum,int isType, Authentication authentication) throws TidcBadParent;
    Fres<Task> getTaskInfo(int id);
    }
